1. Field
The following description relates to a processor configured to execute a store instruction that stores data of a register in a memory, and an apparatus and method to generate the store instruction.
2. Description of the Related Art
A general-purpose microprocessor uses instructions to copy data between registers and a memory. An operation of storing values contained in a register into a memory is called “store”, and an operation of storing values stored in a memory into a register is called “load”. Each of basic “load” and “store” instructions can select and use a single memory address and a single register entry.
However, some processors additionally use instructions that can select and use a plurality of register entries and a plurality of successive instructions. Such an instruction is called a multiple store instruction. Using such a multiple store instruction may reduce the number of load and store instructions that may be often used upon calling functions and returning from functions, thereby reducing the length of a program code.
In order to execute a multiple store instruction, target registers, that is, registers containing data that is to be stored in a memory, have to be designated. A general multiple store instruction may designate registers based on register numbers or a register list. Designating target registers based on register numbers or a register list may require a process of converting the register numbers to addresses every cycle. This process may be implemented using a leading one detector and an additional circuit, which may make a critical path in an instruction decoder, reducing the operation speed of the processor or increasing the number of pipeline stages.